// Inclusion Check
#ifndef _Inc_Op_
#define _Inc_Op_

// -- Includes --

// C++
#include <cstdlib>
#include <iostream>

// -- Name Space -- 
namespace Opcodes
{
    
    // -- Structs --
    
    // -- Variables --
    
    // -- Functions --
    
    // Load / Store
        void LDA(unsigned char Mem); // Set Accumulator
        void LDX(unsigned char Mem); // Set X
        void LDY(unsigned char Mem); // Set Y
        void STA(unsigned char* Mem); // Store Accumulator
        void STX(unsigned char* Mem); // Store X
        void STY(unsigned char* Mem); // Store Y
        
    // Register Transfers
        void pop_Tranfer(unsigned char From, unsigned char* To, bool bSetFlags); // All can be done in one function, pseudo-opcode.
        
    //  Stack Operations
        // TSX/TXS - Can use the Psuedo-Register tranfer function.   
        void PHA(); // Push Accumulator onto stack
        void PHP(); // Push Processor Status onto stack
        void PLA(); // Pull Accumulator from stack
        void PLP(); // Pull Processor Status from stack
        
    // Logical
        void AND(unsigned char Mem); // Logical AND
        void EOR(unsigned char Mem); // Logical Exclusive OR
        void ORA(unsigned char Mem); // Logical OR
        void BIT(unsigned char Mem); // Bittest
        
    // Arithmetic
        void ADC(unsigned char Mem); // Add with carry
        void SBC(unsigned char Mem); // Subtract with carry
        void CMPXY(unsigned char Mem); // Join function for CMP/X/Y.
        
    // Increments / Decrements
        void INC(unsigned char* Mem); // Joint function for INC/X/Y
        void DEC(unsigned char* Mem); // Joint function for DEC/X/Y   
        
    // Shifts / Rotates
        void ASL(unsigned char* Mem); // Arithmetic Shift Left
        void LSR(unsigned char* Mem); // Logical Shift Right
        void ROR(unsigned char* Mem); // Rotate Right
        void ROL(unsigned char* Mem); // Rotate left    
                
    // Jumps & Calls
        void JMP(unsigned short Adr); // Jump to Adr
        void JSR(unsigned short Adr); // Save PC/Status to flag and jump
        void RTS(); // Pull PC/Status from stack 
        
    // Branches
        void BCC(unsigned char Loc); // Branch if carry flag clear
        void BCS(unsigned char Loc); // Branch if carry flag set
        void BEQ(unsigned char Loc); // Branch if zero flag set
        void BNE(unsigned char Loc); // Branch if zero flag clear       
        void BMI(unsigned char Loc); // Branch if negative flag set
        void BPL(unsigned char Loc); // Branch if negative flag clear
        void BVS(unsigned char Loc); // Branch if overflow flag set
        void BVC(unsigned char Loc); // Branch if overflow flag clear
        
    // Status Flag Changes
        void CLC(); // Clear carry flag
        void CLD(); // Clear decimal flag
        void CLI(); // Clear interrupt disable flag
        void CLV(); // Clear overflow flag
        void SEC(); // Set carry flag
        void SED(); // Set decimal mode flag
        void SEI(); // Set interrupt disable flag    

    // System Functions
        void BRK(); // Force an interrupt
        void RTI(); // Return from interupt
        // No NOP, as why bother!?

    // Other
        // Flags
        void SetFlags(unsigned char Mem);    
        

// </Namespace>
}

// Inclusion check
#endif
